package com.trace.app.entity.consts;

public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200, "操作成功"),
    // 登录
    NEED_LOGIN(401, "需要登录后操作"),
    NO_OPERATOR_AUTH(403, "无权限操作"),
    SYSTEM_ERROR(500, "系统异常"),
    USERNAME_EXIST(501, "用户名已存在"),
    PHONE_NUMBER_EXIST(502, "手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505, "用户名或密码错误"),
    CONTENT_NOT_NULL(506, "评论内容不能为空"),
    FILE_TYPE_ERROR(507, "文件类型错误，请上传png文件"),
    USERNAME_NOT_NULL(508, "用户名不能为空"),
    NICKNAME_NOT_NULL(509, "昵称不能为空"),
    PASSWORD_NOT_NULL(510, "密码不能为空"),
    EMAIL_NOT_NULL(511, "邮箱不能为空"),
    NICKNAME_EXIST(512, "昵称已存在"),
    SMS_SEND_FREQUENT(513, "验证码发送过于频繁,一分钟后再发送"),
    CODE_OVERTIME(514, "验证码无效，请重新发送"),
    CODE_ERROR(514, "验证码不一致，请重试"),
    PHONE_NUMBER_EMPTY(515, "手机号不能为空"),
    CODE_EMPTY(516, "验证码不能为空"),
    PHONE_NOT_EXITS(517, "手机号不存在"),
    REPEAT_SIGN(518, "重复签到"),
    DO_NOT_FREQUENT(518, "请勿频繁发送请求"),
    VALIDATION_ERROR(519, "数据校验异常"),
    INSERT_ERROR(201, "插入失败"),
    DELETE_ERROR(201, "删除失败"),
    UPDATE_ERROR(201, "修改失败"),
    LOGIN_SUCCESS(200, "登录成功！"),
    REGISTER_SUCCESS(200,"注册成功！" ),
    OBJECT_IS_NULL(506, "对象为空")
            ;


    int code;
    String message;

    AppHttpCodeEnum(int code, String errorMessage) {
        this.code = code;
        this.message = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}